<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">


    <h:body>

        <ui:composition template="../communityTemplate.xhtml">
            <ui:define name="content">

                <p:panel>
                    <h:form id="poster">
                        <h:inputTextarea cols="55" rows="5" value="#{statusBean.statusMessage}"/><br/>
                        <h:commandButton action="#{statusBean.addStatusMessage()}" value="update"/>
                    </h:form>
                </p:panel>
                <h:form id="updates">
                    <p:dataTable value="#{statusBean.updates}" var="s" 
                                 paginator="true" rows="20"  
                                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                 rowsPerPageTemplate="20,50,100">
                        
                        <p:column>
                            <f:facet name="header">Message</f:facet>
                            #{s.update}
                        </p:column>
                        
                        <p:column>
                            <f:facet name="header">time</f:facet>
                            #{s.timeupdated}
                        </p:column>
                        
                    </p:dataTable>
                </h:form>

            </ui:define>
        </ui:composition>

    </h:body>

</html>

